package com.zxy.supplier_system.server.configuration

import org.apache.catalina.connector.Connector
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory
import org.springframework.boot.web.server.WebServerFactoryCustomizer
import org.springframework.context.annotation.Configuration

@Configuration
class SSLConfiguration : WebServerFactoryCustomizer<TomcatServletWebServerFactory>{
    override fun customize(factory: TomcatServletWebServerFactory) {
        val connector = Connector()
        connector.port = 80
        factory.addAdditionalTomcatConnectors(connector, Connector().apply {
            port = 8080
        })
    }
}